package com.itheima.mapper;

import com.itheima.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OrderMapper {
    /**
     * 根据预约id查询预约信息
     */
    @Select("select orderType,m.name,orderDate,setmeal_id " +
            "from t_order o,t_member m,t_setmeal s " +
            "where o.id = #{id} and o.member_id = m.id and o.setmeal_id = s.id")
    Order findById(Integer id);

    /**
     * 插入部分数据
     * @param order
     */
    Order add(Order order);
}
